<?xml version="1.0" encoding="UTF-8"?>
<dxl:DXLMessage xmlns:dxl="http://greenplum.com/dxl/2010/12/">
  <dxl:Comment><![CDATA[
      Objective: Max card for full outer join should be the non-zero max card
      of left or right child, given at max one of them is zero.  
      We cannot collapse the below query to a Const Table
      Get with False filter as the right child has max card > 0
      
      Query:
      WITH cte1 AS (SELECT a FROM (VALUES (1),(2)) AS x(a)),                                                                                                                                                                                             cte2 AS (SELECT b FROM (VALUES (2)) AS x(b) LIMIT 0)
      SELECT a, b FROM cte1 FULL JOIN cte2 ON true; 
       a | b
      ---+---
       1 |
       2 |
  		]]> 
  </dxl:Comment>	
  <dxl:Thread Id="0">
    <dxl:OptimizerConfig>
      <dxl:EnumeratorConfig Id="0" PlanSamples="0" CostThreshold="0"/>
      <dxl:StatisticsConfig DampingFactorFilter="0.750000" DampingFactorJoin="0.010000" DampingFactorGroupBy="0.750000" MaxStatsBuckets="100"/>
      <dxl:CTEConfig CTEInliningCutoff="0"/>
      <dxl:WindowOids RowNumber="7000" Rank="7001"/>
      <dxl:CostModelConfig CostModelType="1" SegmentsForCosting="3">
        <dxl:CostParams>
          <dxl:CostParam Name="NLJFactor" Value="1024.000000" LowerBound="1023.500000" UpperBound="1024.500000"/>
        </dxl:CostParams>
      </dxl:CostModelConfig>
      <dxl:Hint JoinArityForAssociativityCommutativity="18" ArrayExpansionThreshold="100" JoinOrderDynamicProgThreshold="10" BroadcastThreshold="10000000" EnforceConstraintsOnDML="false"/>
      <dxl:TraceFlags Value="102001,102002,102003,102074,102120,102144,103001,103003,103014,103015,103022,103027,103029,103032,103033,104003,104004,104005,105000"/>
    </dxl:OptimizerConfig>
    <dxl:Metadata SystemIds="0.GPDB">
      <dxl:Type Mdid="0.16.1.0" Name="bool" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="1" PassByValue="true">
        <dxl:EqualityOp Mdid="0.91.1.0"/>
        <dxl:InequalityOp Mdid="0.85.1.0"/>
        <dxl:LessThanOp Mdid="0.58.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.1694.1.0"/>
        <dxl:GreaterThanOp Mdid="0.59.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.1695.1.0"/>
        <dxl:ComparisonOp Mdid="0.1693.1.0"/>
        <dxl:ArrayType Mdid="0.1000.1.0"/>
        <dxl:MinAgg Mdid="0.0.0.0"/>
        <dxl:MaxAgg Mdid="0.0.0.0"/>
        <dxl:AvgAgg Mdid="0.0.0.0"/>
        <dxl:SumAgg Mdid="0.0.0.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:Type Mdid="0.20.1.0" Name="Int8" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="8" PassByValue="true">
        <dxl:EqualityOp Mdid="0.410.1.0"/>
        <dxl:InequalityOp Mdid="0.411.1.0"/>
        <dxl:LessThanOp Mdid="0.412.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.414.1.0"/>
        <dxl:GreaterThanOp Mdid="0.413.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.415.1.0"/>
        <dxl:ComparisonOp Mdid="0.351.1.0"/>
        <dxl:ArrayType Mdid="0.1016.1.0"/>
        <dxl:MinAgg Mdid="0.2131.1.0"/>
        <dxl:MaxAgg Mdid="0.2115.1.0"/>
        <dxl:AvgAgg Mdid="0.2100.1.0"/>
        <dxl:SumAgg Mdid="0.2107.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
      <dxl:Type Mdid="0.23.1.0" Name="int4" IsRedistributable="true" IsHashable="true" IsMergeJoinable="true" IsComposite="false" IsFixedLength="true" Length="4" PassByValue="true">
        <dxl:EqualityOp Mdid="0.96.1.0"/>
        <dxl:InequalityOp Mdid="0.518.1.0"/>
        <dxl:LessThanOp Mdid="0.97.1.0"/>
        <dxl:LessThanEqualsOp Mdid="0.523.1.0"/>
        <dxl:GreaterThanOp Mdid="0.521.1.0"/>
        <dxl:GreaterThanEqualsOp Mdid="0.525.1.0"/>
        <dxl:ComparisonOp Mdid="0.351.1.0"/>
        <dxl:ArrayType Mdid="0.1007.1.0"/>
        <dxl:MinAgg Mdid="0.2132.1.0"/>
        <dxl:MaxAgg Mdid="0.2116.1.0"/>
        <dxl:AvgAgg Mdid="0.2101.1.0"/>
        <dxl:SumAgg Mdid="0.2108.1.0"/>
        <dxl:CountAgg Mdid="0.2147.1.0"/>
      </dxl:Type>
    </dxl:Metadata>
    <dxl:Query>
      <dxl:OutputColumns>
        <dxl:Ident ColId="4" ColName="a" TypeMdid="0.23.1.0"/>
        <dxl:Ident ColId="5" ColName="b" TypeMdid="0.23.1.0"/>
      </dxl:OutputColumns>
      <dxl:CTEList>
        <dxl:LogicalCTEProducer CTEId="1" Columns="1">
          <dxl:LogicalConstTable>
            <dxl:Columns>
              <dxl:Column ColId="1" Attno="1" ColName="column1" TypeMdid="0.23.1.0"/>
            </dxl:Columns>
            <dxl:ConstTuple>
              <dxl:Datum TypeMdid="0.23.1.0" Value="1"/>
            </dxl:ConstTuple>
            <dxl:ConstTuple>
              <dxl:Datum TypeMdid="0.23.1.0" Value="2"/>
            </dxl:ConstTuple>
          </dxl:LogicalConstTable>
        </dxl:LogicalCTEProducer>
        <dxl:LogicalCTEProducer CTEId="2" Columns="3">
          <dxl:LogicalLimit>
            <dxl:SortingColumnList/>
            <dxl:LimitCount>
              <dxl:ConstValue TypeMdid="0.20.1.0" Value="0"/>
            </dxl:LimitCount>
            <dxl:LimitOffset/>
            <dxl:LogicalConstTable>
              <dxl:Columns>
                <dxl:Column ColId="3" Attno="1" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:Columns>
              <dxl:ConstTuple>
                <dxl:Datum TypeMdid="0.23.1.0" Value="2"/>
              </dxl:ConstTuple>
            </dxl:LogicalConstTable>
          </dxl:LogicalLimit>
        </dxl:LogicalCTEProducer>
      </dxl:CTEList>
      <dxl:LogicalCTEAnchor CTEId="1">
        <dxl:LogicalCTEAnchor CTEId="2">
          <dxl:LogicalJoin JoinType="Full">
            <dxl:LogicalCTEConsumer CTEId="1" Columns="4"/>
            <dxl:LogicalCTEConsumer CTEId="2" Columns="5"/>
            <dxl:ConstValue TypeMdid="0.16.1.0" Value="true"/>
          </dxl:LogicalJoin>
        </dxl:LogicalCTEAnchor>
      </dxl:LogicalCTEAnchor>
    </dxl:Query>
    <dxl:Plan Id="0" SpaceSize="2">
      <dxl:Sequence>
        <dxl:Properties>
          <dxl:Cost StartupCost="0" TotalCost="2648064.154894" Rows="4.000000" Width="8"/>
        </dxl:Properties>
        <dxl:ProjList>
          <dxl:ProjElem ColId="2" Alias="a">
            <dxl:Ident ColId="2" ColName="column1" TypeMdid="0.23.1.0"/>
          </dxl:ProjElem>
          <dxl:ProjElem ColId="3" Alias="b">
            <dxl:Ident ColId="3" ColName="column1" TypeMdid="0.23.1.0"/>
          </dxl:ProjElem>
        </dxl:ProjList>
        <dxl:CTEProducer CTEId="2" Columns="4">
          <dxl:Properties>
            <dxl:Cost StartupCost="0" TotalCost="0.000010" Rows="2.000000" Width="1"/>
          </dxl:Properties>
          <dxl:ProjList>
            <dxl:ProjElem ColId="4" Alias="column1">
              <dxl:Ident ColId="4" ColName="column1" TypeMdid="0.23.1.0"/>
            </dxl:ProjElem>
          </dxl:ProjList>
          <dxl:Values>
            <dxl:Properties>
              <dxl:Cost StartupCost="0" TotalCost="0.000008" Rows="2.000000" Width="4"/>
            </dxl:Properties>
            <dxl:ProjList>
              <dxl:ProjElem ColId="4" Alias="column1">
                <dxl:Ident ColId="4" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:ValuesList>
              <dxl:ConstValue TypeMdid="0.23.1.0" Value="1"/>
            </dxl:ValuesList>
            <dxl:ValuesList>
              <dxl:ConstValue TypeMdid="0.23.1.0" Value="2"/>
            </dxl:ValuesList>
          </dxl:Values>
        </dxl:CTEProducer>
        <dxl:Sequence>
          <dxl:Properties>
            <dxl:Cost StartupCost="0" TotalCost="2648064.154852" Rows="4.000000" Width="8"/>
          </dxl:Properties>
          <dxl:ProjList>
            <dxl:ProjElem ColId="2" Alias="column1">
              <dxl:Ident ColId="2" ColName="column1" TypeMdid="0.23.1.0"/>
            </dxl:ProjElem>
            <dxl:ProjElem ColId="3" Alias="column1">
              <dxl:Ident ColId="3" ColName="column1" TypeMdid="0.23.1.0"/>
            </dxl:ProjElem>
          </dxl:ProjList>
          <dxl:CTEProducer CTEId="3" Columns="5">
            <dxl:Properties>
              <dxl:Cost StartupCost="0" TotalCost="0.000000" Rows="0.000000" Width="1"/>
            </dxl:Properties>
            <dxl:ProjList>
              <dxl:ProjElem ColId="5" Alias="column1">
                <dxl:Ident ColId="5" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:Result>
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="0.000000" Rows="0.000000" Width="4"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="5" Alias="column1">
                  <dxl:ConstValue TypeMdid="0.23.1.0" IsNull="true" IsByValue="true"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:OneTimeFilter>
                <dxl:ConstValue TypeMdid="0.16.1.0" Value="false"/>
              </dxl:OneTimeFilter>
            </dxl:Result>
          </dxl:CTEProducer>
          <dxl:Append IsTarget="false" IsZapped="false">
            <dxl:Properties>
              <dxl:Cost StartupCost="0" TotalCost="2648064.154820" Rows="4.000000" Width="8"/>
            </dxl:Properties>
            <dxl:ProjList>
              <dxl:ProjElem ColId="2" Alias="column1">
                <dxl:Ident ColId="2" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:ProjElem>
              <dxl:ProjElem ColId="3" Alias="column1">
                <dxl:Ident ColId="3" ColName="column1" TypeMdid="0.23.1.0"/>
              </dxl:ProjElem>
            </dxl:ProjList>
            <dxl:Filter/>
            <dxl:NestedLoopJoin JoinType="Left" IndexNestedLoopJoin="false" OuterRefAsParam="false">
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="1324032.133603" Rows="3.000000" Width="8"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="2" Alias="column1">
                  <dxl:Ident ColId="2" ColName="column1" TypeMdid="0.23.1.0"/>
                </dxl:ProjElem>
                <dxl:ProjElem ColId="3" Alias="column1">
                  <dxl:Ident ColId="3" ColName="column1" TypeMdid="0.23.1.0"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:JoinFilter>
                <dxl:ConstValue TypeMdid="0.16.1.0" Value="true"/>
              </dxl:JoinFilter>
              <dxl:CTEConsumer CTEId="2" Columns="2">
                <dxl:Properties>
                  <dxl:Cost StartupCost="0" TotalCost="431.000019" Rows="2.000000" Width="4"/>
                </dxl:Properties>
                <dxl:ProjList>
                  <dxl:ProjElem ColId="2" Alias="column1">
                    <dxl:Ident ColId="2" ColName="column1" TypeMdid="0.23.1.0"/>
                  </dxl:ProjElem>
                </dxl:ProjList>
              </dxl:CTEConsumer>
              <dxl:CTEConsumer CTEId="3" Columns="3">
                <dxl:Properties>
                  <dxl:Cost StartupCost="0" TotalCost="431.000000" Rows="0.000000" Width="4"/>
                </dxl:Properties>
                <dxl:ProjList>
                  <dxl:ProjElem ColId="3" Alias="column1">
                    <dxl:Ident ColId="3" ColName="column1" TypeMdid="0.23.1.0"/>
                  </dxl:ProjElem>
                </dxl:ProjList>
              </dxl:CTEConsumer>
            </dxl:NestedLoopJoin>
            <dxl:Result>
              <dxl:Properties>
                <dxl:Cost StartupCost="0" TotalCost="1324032.021184" Rows="1.000000" Width="8"/>
              </dxl:Properties>
              <dxl:ProjList>
                <dxl:ProjElem ColId="8" Alias="column1">
                  <dxl:ConstValue TypeMdid="0.23.1.0" IsNull="true" IsByValue="true"/>
                </dxl:ProjElem>
                <dxl:ProjElem ColId="7" Alias="column1">
                  <dxl:Ident ColId="7" ColName="column1" TypeMdid="0.23.1.0"/>
                </dxl:ProjElem>
              </dxl:ProjList>
              <dxl:Filter/>
              <dxl:OneTimeFilter/>
              <dxl:NestedLoopJoin JoinType="LeftAntiSemiJoin" IndexNestedLoopJoin="false" OuterRefAsParam="false">
                <dxl:Properties>
                  <dxl:Cost StartupCost="0" TotalCost="1324032.021176" Rows="1.000000" Width="4"/>
                </dxl:Properties>
                <dxl:ProjList>
                  <dxl:ProjElem ColId="7" Alias="column1">
                    <dxl:Ident ColId="7" ColName="column1" TypeMdid="0.23.1.0"/>
                  </dxl:ProjElem>
                </dxl:ProjList>
                <dxl:Filter/>
                <dxl:JoinFilter>
                  <dxl:ConstValue TypeMdid="0.16.1.0" Value="true"/>
                </dxl:JoinFilter>
                <dxl:CTEConsumer CTEId="3" Columns="7">
                  <dxl:Properties>
                    <dxl:Cost StartupCost="0" TotalCost="431.000000" Rows="0.000000" Width="4"/>
                  </dxl:Properties>
                  <dxl:ProjList>
                    <dxl:ProjElem ColId="7" Alias="column1">
                      <dxl:Ident ColId="7" ColName="column1" TypeMdid="0.23.1.0"/>
                    </dxl:ProjElem>
                  </dxl:ProjList>
                </dxl:CTEConsumer>
                <dxl:CTEConsumer CTEId="2" Columns="6">
                  <dxl:Properties>
                    <dxl:Cost StartupCost="0" TotalCost="431.000005" Rows="2.000000" Width="1"/>
                  </dxl:Properties>
                  <dxl:ProjList>
                    <dxl:ProjElem ColId="6" Alias="column1">
                      <dxl:Ident ColId="6" ColName="column1" TypeMdid="0.23.1.0"/>
                    </dxl:ProjElem>
                  </dxl:ProjList>
                </dxl:CTEConsumer>
              </dxl:NestedLoopJoin>
            </dxl:Result>
          </dxl:Append>
        </dxl:Sequence>
      </dxl:Sequence>
    </dxl:Plan>
  </dxl:Thread>
</dxl:DXLMessage>
